<% cache([topic, suggest]) do %>
    <% if suggest %>
        <div class="suggest_topic topic media topic-<%= topic.id %>">
    <% else %>
        <div class="topic media topic-<%= topic.id %>">
    <% end %>

    <div class="avatar media-left">
      <%= user_avatar_tag(topic.user, :normal) %>
    </div>
    <div class="infos media-body">
      <div class="title media-heading">
        <%= link_to(truncate(topic.title, length: 100), topic_path(topic), title: topic.title) %>
        <% if suggest %>
            <i class="fa fa-thumb-tack" title="置顶"></i>
        <% end %>
        <%= topic_excellent_tag(topic) %>
        <%= topic_closed_tag(topic) %>
      </div>
      <div class="info">
        <% if action_name != "node" %>
            <%= render_node_name(topic.node_name, topic.node_id) %>
            •
        <% end %>
        <%= user_name_tag(topic.user, data: {author: true}) %>
        <span class="hidden-mobile">
      <%= raw t("common.created_at", time: timeago(topic.created_at)) %>
          •
          <% if topic.last_reply_user_login.blank? %>
        <%= raw t("common.created_at", time: timeago(topic.created_at)) %>
      <% else %>
        <%= t("common.last_by") %> <%= user_name_tag(topic.last_reply_user_login) %> <%= raw t("common.reply_at", time: timeago(topic.replied_at)) %>
      <% end %>
      </span>
      </div>
    </div>
    <div class="count media-right">
      <% if topic.replies_count > 0 %>
          <%= link_to(topic.replies_count, "#{topic_path(topic)}#reply#{topic.replies_count}", class: "state-false") %>
      <% end %>
    </div>
    </div>
<% end %>